﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>主页</title>
    <link th:href="@{/css/list.css}" rel="stylesheet">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/common.css}" rel="stylesheet">
    <link th:href="@{/css/user.css}" rel="stylesheet">


</head>
<body>
<div class="container" style="background:white">
    <div th:replace="~{commons/common::header}"></div>
    <div th:replace="~{commons/common::topbar}"></div>
    <div class="row">
        <div class="col-md-9 col-sm-12">
            <!--微博-->
            <div class="row">
                <div class="col-sm-6 col-md-4" th:each="blog:${blog1}">
                    <div class="thumbnail">
                        <img class="blog-img"
                             th:src="@{/{src}(src=(${blog.image}==''?'imgs/7.jpg':'upload/'+${blog.image}))}"
                             alt="Responsive image">
                        <div class="caption">
                            <h3 th:text="${blog.title}"></h3>
                            <p><a th:href="@{/blog/detail/{id}(id = ${blog.id})}" class="btn btn-primary" role="button">
                                <span class="glyphicon glyphicon-eye-open"></span>&nbsp;详情</a>
                                <a th:href="@{/user/toViewBlogger/{bloggerId}(bloggerId = ${blog.userId})}"
                                   class="btn btn-default" role="button">看作者</a>
                                <img th:src="@{/imgs/{src}(src = ${blog.labelImage})}" alt="Responsive image"
                                     style="width: 32px; float: right" th:title="${blog.blogLabel}">
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <!--微博-->
            <div class="row">
                <div class="col-sm-6 col-md-4" th:each="blog:${blog2}">
                    <div class="thumbnail">
                        <img class="blog-img"
                             th:src="@{/{src}(src=(${blog.image}==''?'imgs/7.jpg':'upload/'+${blog.image}))}"
                             alt="Responsive image">
                        <div class="caption">
                            <h3 th:text="${blog.title}"></h3>
                            <p><a th:href="@{/blog/detail/{id}(id = ${blog.id})}" class="btn btn-primary" role="button">
                                <span class="glyphicon glyphicon-eye-open"></span>&nbsp;详情</a>
                                <a th:href="@{/user/toViewBlogger/{bloggerId}(bloggerId = ${blog.userId})}"
                                   class="btn btn-default" role="button">看作者</a>
                                <img th:src="@{/imgs/{src}(src = ${blog.labelImage})}" alt="Responsive image"
                                     style="width: 32px; float: right" th:title="${blog.blogLabel}">
                            </p>
                        </div>
                    </div>
                </div>
            </div>

            <!--分页-->
            <div class="col-sm-12 text-center">
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                        <li>
                            <a th:href="@{/blog/pageList(pageNo=(${pageNo}>1 ? ${pageNo}-1:1),blogKey=${blogKey},blogLabel=(${labeled}==null? 0: ${labeled}))}"
                               aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li th:each="pageNum:${pageNumList}" th:class="${pageNum == pageNo ? 'active':''}"><a
                                th:href="@{/blog/pageList(pageNo=(${pageNum}),blogKey=${blogKey},blogLabel=(${labeled}==null? 0: ${labeled}))}"
                                th:text="${pageNum} "></a></li>
                        <li>
                            <a th:href="@{/blog/pageList(pageNo=(${pageNo}<${totalPage} ? ${pageNo}+1:${totalPage}),blogKey=${blogKey},blogLabel=(${labeled}==null? 0: ${labeled}))}"
                               aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <!--END分页-->
        </div>
        <div class="col-md-3 col-sm-12">
            <div th:replace="~{commons/common::headerimage}"></div>
            <div th:replace="~{commons/common::hotrange}"></div>
        </div>
    </div>
    <div th:replace="~{commons/common::footer}"></div>
</div>

</body>

<script th:src="@{/js/jquery-1.11.0.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/button.js}"></script>
</html>







